home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Library / Manuels & Misc / Assembly / AOA.ZIP / CH07 / SHELL.ASM < prev   
Encoding:
Assembly Source File  |  1992-12-01  |  2.4 KB  |  105 lines

  1.         .xlist
  2.  
  3. ; Includes for the library routines.  For performance reasons you may want
  4. ; to replace the "stdlib.a" include with the names of the individual packages
  5. ; you actually use.  Doing so will speed up assembly by quite a bit.
  6.  
  7.         include     stdlib.a
  8.         includelib    stdlib.lib
  9.  
  10. ; Note: if you want to use the pattern matching functions in the patterns
  11. ;     package, uncomment the following line:
  12.  
  13. ;        matchfuncs
  14.  
  15.         .list
  16.  
  17.  
  18.  
  19. ;*****************************************************************************
  20.  
  21. dseg        segment    para public 'data'
  22.  
  23. ; Global variables go here:
  24.  
  25.  
  26. ; Note:    If you want to use the STDLIB standard character sets (alpha, digits,
  27. ;    etc.) uncomment the following line:
  28.  
  29. ;        include    stdsets.a
  30.  
  31. dseg        ends
  32.  
  33. ;*****************************************************************************
  34.  
  35.  
  36.  
  37.  
  38.  
  39. cseg        segment    para public 'code'
  40.         assume    cs:cseg, ds:dseg
  41.  
  42.  
  43. ;-----------------------------------------------------------------
  44. ;
  45. ; Here is a good place to put your procedures,
  46. ; functions, and other routines:
  47. ;
  48. ;
  49. ;
  50. ;
  51. ;-----------------------------------------------------------------
  52. ;
  53. ; Main is the main program.  Program execution always begins here.
  54. ;
  55. Main        proc
  56.         mov    ax, dseg
  57.         mov    ds, ax
  58.         mov    es, ax
  59.  
  60. ; Start by calling the memory manager initialization routine.  This
  61. ; particular call allocates all available memory to the heap.  See
  62. ; MEMINIT2 if you want to allocate a fixed heap.
  63. ;
  64. ; Many library routines use the heap, hence the presence of this call
  65. ; in this file.  On the other hand, you may safely remove this call
  66. ; if you do not call any library routines which use the heap.
  67.  
  68.         meminit
  69.  
  70.  
  71.  
  72. ;***************************************************************************
  73. ;
  74. ; Put your main program here.
  75. ;
  76. ;***************************************************************************
  77.  
  78.  
  79.  
  80.  
  81.  
  82. Quit:        ExitPgm            ;DOS macro to quit program.
  83. Main        endp
  84.  
  85. cseg            ends
  86.  
  87.  
  88.  
  89. ; Allocate a reasonable amount of space for the stack (8k).
  90. ; Note: if you use the pattern matching package you should set up a
  91. ;    somewhat larger stack.
  92.  
  93. sseg        segment    para stack 'stack'
  94. stk        db    1024 dup ("stack   ")
  95. sseg        ends
  96.  
  97.  
  98. ; zzzzzzseg must be the last segment that gets loaded into memory!
  99. ; This is where the heap begins.
  100.  
  101. zzzzzzseg    segment    para public 'zzzzzz'
  102. LastBytes    db    16 dup (?)
  103. zzzzzzseg    ends
  104.         end    Main
  105.